The Vectorisation Monad

نویسندگان

  • Keith M. Clarke
  • Richard Bornat
چکیده

Traditionally a vectorising compiler matches the iterative constructs of a program against a set of predeened templates. If a loop contains no dependency cycles then a map template can be used; other simple dependencies can often be expressed in terms of fold or scan templates. This paper addresses the template matching problem within the context of functional programming. A small collection of program identities are used to specify vectorisable for-loops. By incorporating these program identities within a monad, all well-typed for-loops in which the body of the loop is expressed using the vectorisation monad can be vectorised. This technique enables the elimination of template matching from a vectorising compiler, and the proof of the safety of vectorisation can be performed by a type inference mechanism.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Parallel Haskell: the Vectorisation Monad 2 Parallelising Simple Loops 2 2 Parallelising Simple Loops

It has long been known that some of the most common uses of for and while-loops in imperative programs can easily be expressed using the standard higher-order functions fold and map. With this correspondence as a starting point, we derive parallel implementations of various iterative constructs, each having a better complexity than their sequential counterparts, and explore the use of monads to...

متن کامل

Parallel Haskell: the Vectorisation Monad

It has long been known that some of the most common uses of for and while-loops in imperative programs can easily be expressed using the standard higher-order functions fold and map. With this correspondence as a starting point, we derive parallel implementations of various iterative constructs, each having a better complexity than their sequential counterparts, and explore the use of monads to...

متن کامل

Partial Vectorisation of Haskell Programs

Vectorisation for functional programs, also called the flattening transformation, relies on drastically reordering computations and restructuring the representation of data types. As a result, it only applies to the purely functional core of a fully-fledged functional language, such as Haskell or ML. A concrete implementation needs to apply vectorisation selectively and integrate vectorised wit...

متن کامل

A cottage industry of lax extensions

In this work, we describe an adjunction between the comma category of Set-based monads under the V -powerset monad and the category of associative lax extensions of Set-based monads to the category of V -relations. In the process, we give a general construction of the Kleisli extension of a monad to the category of V-relations.

متن کامل

Applications of the Kleisli and Eilenberg-Moore 2-adjunctions

In 2010, J. Climent Vidal and J. Soliveres Tur developed, among other things, a pair of 2-adjunctions between the 2-category of adjunctions and the 2-category of monads. One is related to the Kleisli adjunction and the other to the Eilenberg-Moore adjunction for a given monad.Since any 2-adjunction induces certain natural isomorphisms of categories, these can be used to classify bijection...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994